package com.whisperly.echotalk.bllmodel;

import androidx.annotation.Keep;
import androidx.annotation.NonNull;

import java.io.Serializable;
import java.time.LocalDateTime;

@Keep
public class CommonResponse implements Serializable {

    private Boolean success;

    // 消息描述
    private String message;

    // 错误详情（可选）
    private String error;

    // 状态码
    private Integer code;

    public CommonResponse() {
    }

    @Override
    @NonNull
    public String toString() {
        return "CommonResponse{" +
                "success=" + success +
                ", message='" + message + '\'' +
                ", code=" + code +
                ", error='" + error + '\'' +
                '}';
    }

    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getError() {
        return error;
    }

    public void setError(String error) {
        this.error = error;
    }

    public CommonResponse(Boolean code, String message, String error) {
        this.success = code;
        this.message = message;
        this.error = error;
    }
}
